package com.jltx.xq.zeus.startup.dispatcher

import com.jltx.xq.zeus.startup.Startup
import com.jltx.xq.zeus.startup.model.StartupSortStore

/**
 * @author aidenquan
 *         Created by junlintianxia on 2022/07/15.
 */
interface ManagerDispatcher {
    /**
     * dispatch prepare
     */
    fun prepare()

    /**
     * dispatch startup to executing.
     */
    fun dispatch(startup: Startup<*>, sortStore: StartupSortStore)

    /**
     * notify children when dependency startup completed.
     */
    fun notifyChildren(dependencyParent: Startup<*>, result: Any?, sortStore: StartupSortStore)
}